/**
 * Created by baidm in 2022/6/4 on 18:59
 */
import $ from "jquery"
import {Router} from "vue-router";

export const openWindow = (router: Router, name: String, params?: Object) => {
    let {origin, pathname} = window.location
    // @ts-ignore
    let {href} = router.resolve({name}, {params})
    window.open(`${origin}${pathname}${href}`, "_blank")
}

export const addAnimate = ($event: MouseEvent) => {
    $($event.target as HTMLElement).addClass("animated bounce")
}

export const removeAnimate = ($event: MouseEvent) => {
    $($event.target as HTMLElement).removeClass("animated bounce")
}
